<template>
  <div class="tohomeBox" @click="toHome">
    <svg class="icon_info" aria-hidden="true">
      <use xlink:href="#icon-chongwujiyang"></use>
    </svg>
  </div>
</template>

<script>
import { useRouter } from "vue-router";

export default {
  name: "ToHome",
  setup() {
    const router = useRouter();
    const toHome = () => {
      router.push("/");
    };
    return { toHome };
  },
};
</script>

<style scoped>
.tohomeBox {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: fixed;
  bottom: 10%;
  right: 1.5rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  box-sizing: border-box;
  background-color: rgba(224, 240, 249, 0.5);
  /*border: 2px #d5babd solid;*/
  z-index: 99;
}

.icon_info {
  width: 2rem;
  height: 2rem;
  fill: currentColor;
  overflow: hidden;
}
</style>
